from collections import defaultdict
from skidl import Pin, Part, Alias, SchLib, SKIDL, TEMPLATE

from skidl.pin import pin_types

SKIDL_lib_version = '0.0.1'

RF_Bluetooth = SchLib(tool=SKIDL).add_parts(*[
        Part(**{ 'name':'BL652', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'BL652'}), 'ref_prefix':'U', 'fplist':['RF_Module:Laird_BL652'], 'footprint':'RF_Module:Laird_BL652', 'keywords':'Bluetooth Nordic nRF52', 'description':'', 'datasheet':'http://cdn.lairdtech.com/home/brandworld/files/Datasheet%20-%20BL652.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nBL652\n\nBluetooth Nordic nRF52', 'pins':[
            Pin(num='1',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='SIO_16',func=pin_types.BIDIR,unit=1),
            Pin(num='11',name='SIO_14',func=pin_types.BIDIR,unit=1),
            Pin(num='12',name='SIO_12',func=pin_types.BIDIR,unit=1),
            Pin(num='13',name='SIO_11',func=pin_types.BIDIR,unit=1),
            Pin(num='14',name='SIO_10/NFC2',func=pin_types.BIDIR,unit=1),
            Pin(num='15',name='SIO_09/NFC1',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='17',name='SIO_08',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='SIO_07',func=pin_types.BIDIR,unit=1),
            Pin(num='19',name='SIO_06',func=pin_types.BIDIR,unit=1),
            Pin(num='2',name='SIO_24',func=pin_types.BIDIR,unit=1),
            Pin(num='20',name='SIO_05/AIN3',func=pin_types.BIDIR,unit=1),
            Pin(num='21',name='SIO_04/AIN2',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='SIO_03/AIN1',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='SIO_02/AIN0',func=pin_types.BIDIR,unit=1),
            Pin(num='24',name='SIO_01',func=pin_types.BIDIR,unit=1),
            Pin(num='25',name='SIO_00',func=pin_types.BIDIR,unit=1),
            Pin(num='26',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='27',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='28',name='SIO_13',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='SIO_15',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='SIO_23',func=pin_types.BIDIR,unit=1),
            Pin(num='30',name='SIO_17',func=pin_types.BIDIR,unit=1),
            Pin(num='31',name='SIO_19',func=pin_types.BIDIR,unit=1),
            Pin(num='32',name='SIO_31/AIN7',func=pin_types.BIDIR,unit=1),
            Pin(num='33',name='SIO_30/AIN6',func=pin_types.BIDIR,unit=1),
            Pin(num='34',name='SIO_29/AIN5',func=pin_types.BIDIR,unit=1),
            Pin(num='35',name='SIO_28/AIN4',func=pin_types.BIDIR,unit=1),
            Pin(num='36',name='SIO_27',func=pin_types.BIDIR,unit=1),
            Pin(num='37',name='SIO_26',func=pin_types.BIDIR,unit=1),
            Pin(num='38',name='SIO_25',func=pin_types.BIDIR,unit=1),
            Pin(num='39',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='4',name='SIO_22',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='SWDIO',func=pin_types.BIDIR,unit=1),
            Pin(num='6',name='SWDCLK',func=pin_types.BIDIR,unit=1),
            Pin(num='7',name='SIO_21',func=pin_types.BIDIR,unit=1),
            Pin(num='8',name='SIO_20',func=pin_types.BIDIR,unit=1),
            Pin(num='9',name='SIO_18',func=pin_types.BIDIR,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'BM78SPPS5MC2', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'BM78SPPS5MC2'}), 'ref_prefix':'U', 'fplist':['RF_Module:BM78SPPS5XC2'], 'footprint':'RF_Module:BM78SPPS5XC2', 'keywords':'Bluetooth BLE BT GAP SPP SDP RFCOMM L2CAP GATT ATT SMP L2CAP', 'description':'', 'datasheet':'http://ww1.microchip.com/downloads/en/DeviceDoc/60001380C.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nBM78SPPS5MC2\n\nBluetooth BLE BT GAP SPP SDP RFCOMM L2CAP GATT ATT SMP L2CAP', 'pins':[
            Pin(num='1',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='PMULDO_O',func=pin_types.PASSIVE,unit=1),
            Pin(num='11',name='P0_4',func=pin_types.OUTPUT,unit=1),
            Pin(num='12',name='P1_5',func=pin_types.OUTPUT,unit=1),
            Pin(num='13',name='SCL/P1_2',func=pin_types.OUTPUT,unit=1),
            Pin(num='14',name='SDA/P1_3',func=pin_types.BIDIR,unit=1),
            Pin(num='15',name='P1_7',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='P0_5',func=pin_types.BIDIR,unit=1),
            Pin(num='17',name='P0_0',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='P2_0',func=pin_types.INPUT,unit=1),
            Pin(num='19',name='P2_4',func=pin_types.INPUT,unit=1),
            Pin(num='2',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='20',name='EAN',func=pin_types.INPUT,unit=1),
            Pin(num='21',name='~{RST}',func=pin_types.INPUT,unit=1),
            Pin(num='22',name='HCI_RXD',func=pin_types.INPUT,unit=1),
            Pin(num='23',name='HCI_TXD',func=pin_types.OUTPUT,unit=1),
            Pin(num='24',name='P3_1',func=pin_types.BIDIR,unit=1),
            Pin(num='25',name='P3_2',func=pin_types.BIDIR,unit=1),
            Pin(num='26',name='P3_3',func=pin_types.BIDIR,unit=1),
            Pin(num='27',name='P3_4',func=pin_types.BIDIR,unit=1),
            Pin(num='28',name='P3_6',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='P3_7',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='30',name='LED1',func=pin_types.OUTPUT,unit=1),
            Pin(num='31',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='32',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='33',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='4',name='BAT_IN',func=pin_types.PWRIN,unit=1),
            Pin(num='5',name='SW_BTN',func=pin_types.INPUT,unit=1),
            Pin(num='6',name='LDO33_O',func=pin_types.PWROUT,unit=1),
            Pin(num='7',name='VDD_IO',func=pin_types.PWRIN,unit=1),
            Pin(num='8',name='LDO18_O',func=pin_types.PWROUT,unit=1),
            Pin(num='9',name='WAKE_UP',func=pin_types.INPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'BTM112', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'BTM112'}), 'ref_prefix':'U', 'fplist':[''], 'footprint':'', 'keywords':'Bluetooth BT SPP Module', 'description':'', 'datasheet':'https://www.sparkfun.com/datasheets/Wireless/Bluetooth/BTM112_wATcommands.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nBTM112\n\nBluetooth BT SPP Module', 'pins':[
            Pin(num='1',name='PIO8',func=pin_types.BIDIR,unit=1),
            Pin(num='10',name='SPI_MOSI',func=pin_types.INPUT,unit=1),
            Pin(num='11',name='~{UART_CTS}',func=pin_types.INPUT,unit=1),
            Pin(num='12',name='UART_TX',func=pin_types.OUTPUT,unit=1),
            Pin(num='13',name='~{UART_RTS}',func=pin_types.OUTPUT,unit=1),
            Pin(num='14',name='UART_RX',func=pin_types.INPUT,unit=1),
            Pin(num='15',name='PIO11',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='17',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='18',name='PCM_OUT',func=pin_types.OUTPUT,unit=1),
            Pin(num='19',name='PCM_SYNC',func=pin_types.BIDIR,unit=1),
            Pin(num='2',name='PIO9',func=pin_types.BIDIR,unit=1),
            Pin(num='20',name='PCM_IN',func=pin_types.INPUT,unit=1),
            Pin(num='21',name='PCM_CLK',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='USB_D+',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='USB_D-',func=pin_types.BIDIR,unit=1),
            Pin(num='24',name='~{LINK}/PIO7',func=pin_types.BIDIR,unit=1),
            Pin(num='25',name='CONN/PIO6',func=pin_types.BIDIR,unit=1),
            Pin(num='26',name='PIO5',func=pin_types.BIDIR,unit=1),
            Pin(num='27',name='BTN/PIO4',func=pin_types.BIDIR,unit=1),
            Pin(num='28',name='PIO3',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='PIO2',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='PIO10',func=pin_types.BIDIR,unit=1),
            Pin(num='30',name='PIO1',func=pin_types.BIDIR,unit=1),
            Pin(num='31',name='PIO0',func=pin_types.BIDIR,unit=1),
            Pin(num='32',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='33',name='RF',func=pin_types.PASSIVE,unit=1),
            Pin(num='34',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='4',name='AIO0',func=pin_types.PASSIVE,unit=1),
            Pin(num='5',name='AIO1',func=pin_types.PASSIVE,unit=1),
            Pin(num='6',name='RESET',func=pin_types.INPUT,unit=1),
            Pin(num='7',name='SPI_MISO',func=pin_types.OUTPUT,unit=1),
            Pin(num='8',name='~{SPI_CSB}',func=pin_types.INPUT,unit=1),
            Pin(num='9',name='SPI_CLK',func=pin_types.INPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'BTM222', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'BTM222'}), 'ref_prefix':'U', 'fplist':[''], 'footprint':'', 'keywords':'Bluetooth BT SPP Module', 'description':'', 'datasheet':'https://www.tme.eu/de/Document/b90358c53cd65c9b10d2914f55812666/btm222_datasheet.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nBTM222\n\nBluetooth BT SPP Module', 'pins':[
            Pin(num='1',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='11',name='PIO5/USB_DETACH/BT_ACT',func=pin_types.BIDIR,unit=1),
            Pin(num='12',name='PIO6/CLK_REQ/WAN_ACT',func=pin_types.BIDIR,unit=1),
            Pin(num='13',name='PIO7',func=pin_types.BIDIR,unit=1),
            Pin(num='14',name='PIO8',func=pin_types.BIDIR,unit=1),
            Pin(num='15',name='PIO9',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='~{RESET}',func=pin_types.INPUT,unit=1),
            Pin(num='17',name='VCC',func=pin_types.PWRIN,unit=1),
            Pin(num='18',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='19',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='2',name='PVCC',func=pin_types.PWRIN,unit=1),
            Pin(num='20',name='USB_D+',func=pin_types.BIDIR,unit=1),
            Pin(num='21',name='USB_D-',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='PCM_SYNC',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='PCM_IN',func=pin_types.INPUT,unit=1),
            Pin(num='24',name='PCM_OUT',func=pin_types.OUTPUT,unit=1),
            Pin(num='25',name='PCM_CLK',func=pin_types.BIDIR,unit=1),
            Pin(num='26',name='UART_RX',func=pin_types.INPUT,unit=1),
            Pin(num='27',name='UART_TX',func=pin_types.OUTPUT,unit=1),
            Pin(num='28',name='UART_RTS',func=pin_types.OUTPUT,unit=1),
            Pin(num='29',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='3',name='AIO0/SLEEPCLK',func=pin_types.BIDIR,unit=1),
            Pin(num='30',name='UART_CTS',func=pin_types.INPUT,unit=1),
            Pin(num='31',name='SPI_MOSI',func=pin_types.INPUT,unit=1),
            Pin(num='32',name='~{SPI_CSB}',func=pin_types.INPUT,unit=1),
            Pin(num='33',name='SPI_CLK',func=pin_types.INPUT,unit=1),
            Pin(num='34',name='SPI_MISO',func=pin_types.OUTPUT,unit=1),
            Pin(num='35',name='PIO11',func=pin_types.BIDIR,unit=1),
            Pin(num='36',name='PIO10',func=pin_types.BIDIR,unit=1),
            Pin(num='37',name='RF',func=pin_types.PASSIVE,unit=1),
            Pin(num='38',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='4',name='AIO1',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='PIO0/RXEN',func=pin_types.BIDIR,unit=1),
            Pin(num='6',name='PIO1/TXEN',func=pin_types.BIDIR,unit=1),
            Pin(num='7',name='PIO2/USB_PU/CLK_REQ_OUT',func=pin_types.BIDIR,unit=1),
            Pin(num='8',name='PIO3/USB_WKUP/CLK_REQ_IN',func=pin_types.BIDIR,unit=1),
            Pin(num='9',name='PIO4/USB_ON/BT_PRIOR',func=pin_types.BIDIR,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'MOD-nRF8001', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'MOD-nRF8001'}), 'ref_prefix':'U', 'fplist':['RF_Module:MOD-nRF8001'], 'footprint':'RF_Module:MOD-nRF8001', 'keywords':'Bluetooth Low Energy nRF8001', 'description':'', 'datasheet':'https://www.olimex.com/Products/Modules/RF/MOD-nRF8001/', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nMOD-nRF8001\n\nBluetooth Low Energy nRF8001', 'pins':[
            Pin(num='1',name='3V3',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='RDYN',func=pin_types.OUTPUT,unit=1),
            Pin(num='11',name='ACTIVE',func=pin_types.OUTPUT,unit=1),
            Pin(num='2',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='3',name='RST',func=pin_types.INPUT,unit=1),
            Pin(num='4',name='RXD',func=pin_types.INPUT,unit=1),
            Pin(num='5',name='TXD',func=pin_types.OUTPUT,unit=1),
            Pin(num='6',name='SCK',func=pin_types.INPUT,unit=1),
            Pin(num='7',name='REQN',func=pin_types.INPUT,unit=1),
            Pin(num='8',name='MOSI',func=pin_types.INPUT,unit=1),
            Pin(num='9',name='MISO',func=pin_types.OUTPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'Microchip_BM83', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'Microchip_BM83'}), 'ref_prefix':'U', 'fplist':['RF_Module:Microchip_BM83'], 'footprint':'RF_Module:Microchip_BM83', 'keywords':'HFP HSP A2DP SPP AVRCP PBAP', 'description':'', 'datasheet':'https://ww1.microchip.com/downloads/aemDocuments/documents/WSG/ProductDocuments/DataSheets/70005402E.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nMicrochip_BM83\n\nHFP HSP A2DP SPP AVRCP PBAP', 'pins':[
            Pin(num='1',name='DR1',func=pin_types.INPUT,unit=1),
            Pin(num='10',name='MICP2',func=pin_types.INPUT,unit=1),
            Pin(num='11',name='AIR',func=pin_types.INPUT,unit=1),
            Pin(num='12',name='AIL',func=pin_types.INPUT,unit=1),
            Pin(num='13',name='MICN1',func=pin_types.INPUT,unit=1),
            Pin(num='14',name='MICP1',func=pin_types.INPUT,unit=1),
            Pin(num='15',name='MICBIAS',func=pin_types.PASSIVE,unit=1),
            Pin(num='16',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='17',name='DMIC_CLK',func=pin_types.OUTPUT,unit=1),
            Pin(num='18',name='DMIC1_R',func=pin_types.OUTPUT,unit=1),
            Pin(num='19',name='DMIC1_L',func=pin_types.OUTPUT,unit=1),
            Pin(num='2',name='RFS1',func=pin_types.BIDIR,unit=1),
            Pin(num='20',name='P3_2',func=pin_types.BIDIR,unit=1),
            Pin(num='21',name='P2_6',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='ADAP_IN',func=pin_types.PWRIN,unit=1),
            Pin(num='23',name='BAT_IN',func=pin_types.PWRIN,unit=1),
            Pin(num='24',name='SYS_PWR',func=pin_types.PWROUT,unit=1),
            Pin(num='25',name='VDD_IO',func=pin_types.NOCONNECT,unit=1),
            Pin(num='26',name='PWR(MFB)',func=pin_types.INPUT,unit=1),
            Pin(num='27',name='SK1_AMB_DET',func=pin_types.INPUT,unit=1),
            Pin(num='28',name='SK2_KEY_AD',func=pin_types.INPUT,unit=1),
            Pin(num='29',name='P8_6/UART_RXD',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='SCLK1',func=pin_types.BIDIR,unit=1),
            Pin(num='30',name='P8_5/UART_TXD',func=pin_types.BIDIR,unit=1),
            Pin(num='31',name='P3_4/UART_RTS',func=pin_types.BIDIR,unit=1),
            Pin(num='32',name='LED1',func=pin_types.INPUT,unit=1),
            Pin(num='33',name='P0_2',func=pin_types.BIDIR,unit=1),
            Pin(num='34',name='LED2',func=pin_types.INPUT,unit=1),
            Pin(num='35',name='P0_6',func=pin_types.BIDIR,unit=1),
            Pin(num='36',name='DM',func=pin_types.BIDIR,unit=1),
            Pin(num='37',name='DP',func=pin_types.BIDIR,unit=1),
            Pin(num='38',name='P0_3',func=pin_types.BIDIR,unit=1),
            Pin(num='39',name='P2_7',func=pin_types.BIDIR,unit=1),
            Pin(num='4',name='DT1',func=pin_types.OUTPUT,unit=1),
            Pin(num='40',name='P0_5',func=pin_types.BIDIR,unit=1),
            Pin(num='41',name='P1_6/PWM1',func=pin_types.BIDIR,unit=1),
            Pin(num='42',name='P2_3',func=pin_types.BIDIR,unit=1),
            Pin(num='43',name='~{RST}',func=pin_types.INPUT,unit=1),
            Pin(num='44',name='P0_1',func=pin_types.BIDIR,unit=1),
            Pin(num='45',name='P0_7',func=pin_types.BIDIR,unit=1),
            Pin(num='46',name='P1_2/TDI_CPU/SCL',func=pin_types.BIDIR,unit=1),
            Pin(num='47',name='P1_3/TCK_CPU/SDA',func=pin_types.BIDIR,unit=1),
            Pin(num='48',name='P3_7/UART_CTS',func=pin_types.BIDIR,unit=1),
            Pin(num='49',name='P0_0/UART_TX_IND',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='MCLK1',func=pin_types.OUTPUT,unit=1),
            Pin(num='50',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='56',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='57',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='6',name='AOHPR',func=pin_types.OUTPUT,unit=1),
            Pin(num='7',name='AOHPM',func=pin_types.OUTPUT,unit=1),
            Pin(num='8',name='AOHPL',func=pin_types.OUTPUT,unit=1),
            Pin(num='9',name='MICN2',func=pin_types.INPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'RFD77101', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'RFD77101'}), 'ref_prefix':'U', 'fplist':['RF_Module:RFDigital_RFD77101'], 'footprint':'RF_Module:RFDigital_RFD77101', 'keywords':'Simblee ARM Cortex-M0 Bluetooth antenna', 'description':'', 'datasheet':'https://www.simblee.com/Simblee%20RFD77101%20Datasheet%20v1.0.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nRFD77101\n\nSimblee ARM Cortex-M0 Bluetooth antenna', 'pins':[
            Pin(num='1',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='NC',func=pin_types.NOCONNECT,unit=1),
            Pin(num='11',name='P0.19',func=pin_types.BIDIR,unit=1),
            Pin(num='12',name='P0.17',func=pin_types.BIDIR,unit=1),
            Pin(num='13',name='P0.18',func=pin_types.BIDIR,unit=1),
            Pin(num='14',name='P0.16',func=pin_types.BIDIR,unit=1),
            Pin(num='15',name='P0.15',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='P0.12',func=pin_types.BIDIR,unit=1),
            Pin(num='17',name='P0.11',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='P0.09',func=pin_types.BIDIR,unit=1),
            Pin(num='19',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='2',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='20',name='P0.08',func=pin_types.BIDIR,unit=1),
            Pin(num='21',name='P0.05/AIN6',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='P0.03/AIN4',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='P0.01/AIN2',func=pin_types.BIDIR,unit=1),
            Pin(num='24',name='P0.02/AIN3',func=pin_types.BIDIR,unit=1),
            Pin(num='25',name='P0.00/AREF0',func=pin_types.BIDIR,unit=1),
            Pin(num='26',name='P0.07',func=pin_types.BIDIR,unit=1),
            Pin(num='27',name='P0.10',func=pin_types.BIDIR,unit=1),
            Pin(num='28',name='P0.13',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='P0.14',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='NC',func=pin_types.NOCONNECT,unit=1),
            Pin(num='30',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='31',name='P0.06/AREF1/AIN7',func=pin_types.BIDIR,unit=1),
            Pin(num='32',name='P0.04/AIN5',func=pin_types.BIDIR,unit=1),
            Pin(num='33',name='P0.20',func=pin_types.BIDIR,unit=1),
            Pin(num='34',name='P0.23',func=pin_types.BIDIR,unit=1),
            Pin(num='35',name='P0.24',func=pin_types.BIDIR,unit=1),
            Pin(num='36',name='P0.21',func=pin_types.BIDIR,unit=1),
            Pin(num='37',name='P0.22',func=pin_types.BIDIR,unit=1),
            Pin(num='38',name='P0.25',func=pin_types.BIDIR,unit=1),
            Pin(num='39',name='P0.28',func=pin_types.BIDIR,unit=1),
            Pin(num='4',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='40',name='P0.29',func=pin_types.BIDIR,unit=1),
            Pin(num='41',name='P0.30',func=pin_types.BIDIR,unit=1),
            Pin(num='42',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='43',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='44',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='45',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='5',name='NC',func=pin_types.NOCONNECT,unit=1),
            Pin(num='6',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='7',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='8',name='RESET/SWDIO',func=pin_types.BIDIR,unit=1),
            Pin(num='9',name='FACTORY/SWDCLK',func=pin_types.INPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'RN42', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'RN42'}), 'ref_prefix':'U', 'fplist':['RF_Module:RN42'], 'footprint':'RF_Module:RN42', 'keywords':'Bluetooth Module', 'description':'', 'datasheet':'http://ww1.microchip.com/downloads/en/DeviceDoc/rn-42-ds-v2.32r.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nRN42\n\nBluetooth Module', 'pins':[
            Pin(num='1',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='PCM_OUT',func=pin_types.OUTPUT,unit=1),
            Pin(num='11',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='12',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='13',name='UART_RX',func=pin_types.INPUT,unit=1),
            Pin(num='14',name='UART_TX',func=pin_types.OUTPUT,unit=1),
            Pin(num='15',name='UART_RTS',func=pin_types.OUTPUT,unit=1),
            Pin(num='16',name='UART_CTS',func=pin_types.INPUT,unit=1),
            Pin(num='17',name='USB_D+',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='USB_D-',func=pin_types.BIDIR,unit=1),
            Pin(num='19',name='GPIO2',func=pin_types.BIDIR,unit=1),
            Pin(num='2',name='SPI_MOSI',func=pin_types.INPUT,unit=1),
            Pin(num='20',name='GPIO3',func=pin_types.INPUT,unit=1),
            Pin(num='21',name='GPIO5',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='GPIO4',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='SPI_CSB',func=pin_types.INPUT,unit=1),
            Pin(num='24',name='SPI_MISO',func=pin_types.OUTPUT,unit=1),
            Pin(num='28',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='29',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='3',name='GPIO6',func=pin_types.INPUT,unit=1),
            Pin(num='30',name='AIO0',func=pin_types.INPUT,unit=1),
            Pin(num='31',name='GPIO8',func=pin_types.OUTPUT,unit=1),
            Pin(num='32',name='GPIO9',func=pin_types.BIDIR,unit=1),
            Pin(num='33',name='GPIO10',func=pin_types.BIDIR,unit=1),
            Pin(num='34',name='GPIO11',func=pin_types.BIDIR,unit=1),
            Pin(num='35',name='AIO1',func=pin_types.INPUT,unit=1),
            Pin(num='36',name='SHIELD',func=pin_types.INPUT,unit=1),
            Pin(num='4',name='GPIO7',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='RESET',func=pin_types.INPUT,unit=1),
            Pin(num='6',name='SPI_CLK',func=pin_types.INPUT,unit=1),
            Pin(num='7',name='PCM_CLK',func=pin_types.BIDIR,unit=1),
            Pin(num='8',name='PCM_SYNC',func=pin_types.BIDIR,unit=1),
            Pin(num='9',name='PCM_IN',func=pin_types.INPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'RN42N', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'RN42N'}), 'ref_prefix':'U', 'fplist':['RF_Module:RN42N'], 'footprint':'RF_Module:RN42N', 'keywords':'Bluetooth Module', 'description':'', 'datasheet':'http://ww1.microchip.com/downloads/en/DeviceDoc/rn-42-ds-v2.32r.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nRN42N\n\nBluetooth Module', 'pins':[
            Pin(num='1',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='PCM_OUT',func=pin_types.OUTPUT,unit=1),
            Pin(num='11',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='12',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='13',name='UART_RX',func=pin_types.INPUT,unit=1),
            Pin(num='14',name='UART_TX',func=pin_types.OUTPUT,unit=1),
            Pin(num='15',name='UART_RTS',func=pin_types.OUTPUT,unit=1),
            Pin(num='16',name='UART_CTS',func=pin_types.INPUT,unit=1),
            Pin(num='17',name='USB_D+',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='USB_D-',func=pin_types.BIDIR,unit=1),
            Pin(num='19',name='GPIO2',func=pin_types.BIDIR,unit=1),
            Pin(num='2',name='SPI_MOSI',func=pin_types.INPUT,unit=1),
            Pin(num='20',name='GPIO3',func=pin_types.INPUT,unit=1),
            Pin(num='21',name='GPIO5',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='GPIO4',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='SPI_CSB',func=pin_types.INPUT,unit=1),
            Pin(num='24',name='SPI_MISO',func=pin_types.OUTPUT,unit=1),
            Pin(num='25',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='26',name='RF_ANT',func=pin_types.BIDIR,unit=1),
            Pin(num='27',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='28',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='29',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='3',name='GPIO6',func=pin_types.INPUT,unit=1),
            Pin(num='30',name='AIO0',func=pin_types.INPUT,unit=1),
            Pin(num='31',name='GPIO8',func=pin_types.OUTPUT,unit=1),
            Pin(num='32',name='GPIO9',func=pin_types.BIDIR,unit=1),
            Pin(num='33',name='GPIO10',func=pin_types.BIDIR,unit=1),
            Pin(num='34',name='GPIO11',func=pin_types.BIDIR,unit=1),
            Pin(num='35',name='AIO1',func=pin_types.INPUT,unit=1),
            Pin(num='36',name='SHIELD',func=pin_types.INPUT,unit=1),
            Pin(num='4',name='GPIO7',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='RESET',func=pin_types.INPUT,unit=1),
            Pin(num='6',name='SPI_CLK',func=pin_types.INPUT,unit=1),
            Pin(num='7',name='PCM_CLK',func=pin_types.BIDIR,unit=1),
            Pin(num='8',name='PCM_SYNC',func=pin_types.BIDIR,unit=1),
            Pin(num='9',name='PCM_IN',func=pin_types.INPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'RN4871', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'RN4871'}), 'ref_prefix':'U', 'fplist':['RF_Module:Microchip_RN4871'], 'footprint':'RF_Module:Microchip_RN4871', 'keywords':'Bluetooth Low Energy 4.2 Module', 'description':'', 'datasheet':'http://ww1.microchip.com/downloads/en/DeviceDoc/50002489A.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nRN4871\n\nBluetooth Low Energy 4.2 Module', 'pins':[
            Pin(num='1',name='BT_RF',func=pin_types.OUTPUT,unit=1),
            Pin(num='10',name='RST',func=pin_types.INPUT,unit=1),
            Pin(num='11',name='P0_0',func=pin_types.BIDIR,unit=1),
            Pin(num='12',name='P0_2',func=pin_types.BIDIR,unit=1),
            Pin(num='13',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='14',name='VBAT',func=pin_types.PWRIN,unit=1),
            Pin(num='15',name='P2_7',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='P2_0',func=pin_types.INPUT,unit=1),
            Pin(num='2',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='3',name='P1_2',func=pin_types.BIDIR,unit=1),
            Pin(num='4',name='P1_3',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='P1_7',func=pin_types.BIDIR,unit=1),
            Pin(num='6',name='P1_6',func=pin_types.BIDIR,unit=1),
            Pin(num='7',name='UART_RX',func=pin_types.INPUT,unit=1),
            Pin(num='8',name='UART_TX',func=pin_types.OUTPUT,unit=1),
            Pin(num='9',name='P3_6',func=pin_types.BIDIR,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'SPBTLE-RF', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'SPBTLE-RF'}), 'ref_prefix':'U', 'fplist':['RF_Module:ST_SPBTLE'], 'footprint':'RF_Module:ST_SPBTLE', 'keywords':'BLE bluetooth module low-power', 'description':'', 'datasheet':'http://www.st.com/resource/en/datasheet/spbtle-rf.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nSPBTLE-RF\n\nBLE bluetooth module low-power', 'pins':[
            Pin(num='1',name='NC/EXT_LPCLK',func=pin_types.INPUT,unit=1),
            Pin(num='10',name='SPI_~{CS}',func=pin_types.INPUT,unit=1),
            Pin(num='11',name='~{BT_RESET}',func=pin_types.INPUT,unit=1),
            Pin(num='2',name='NC/GPIO2',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='NC/ANA_TEST',func=pin_types.INPUT,unit=1),
            Pin(num='4',name='SPI_IRQ',func=pin_types.OUTPUT,unit=1),
            Pin(num='5',name='VIN',func=pin_types.PWRIN,unit=1),
            Pin(num='6',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='7',name='SPI_CLK',func=pin_types.INPUT,unit=1),
            Pin(num='8',name='SPI_MISO',func=pin_types.OUTPUT,unit=1),
            Pin(num='9',name='SPI_MOSI',func=pin_types.INPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'nRF8001', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'nRF8001'}), 'ref_prefix':'U', 'fplist':['Package_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm'], 'footprint':'Package_DFN_QFN:QFN-32-1EP_5x5mm_P0.5mm_EP3.45x3.45mm', 'keywords':'BLE, bluetooth', 'description':'', 'datasheet':'https://www.nordicsemi.com/eng/nordic/content_download/2981/38488/file/nRF8001_PS_v1.3.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nnRF8001\n\nBLE, bluetooth', 'pins':[
            Pin(num='1',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='RXD',func=pin_types.INPUT,unit=1),
            Pin(num='11',name='SCK',func=pin_types.INPUT,unit=1),
            Pin(num='12',name='REQN',func=pin_types.BIDIR,unit=1),
            Pin(num='13',name='MOSI',func=pin_types.INPUT,unit=1),
            Pin(num='14',name='MISO',func=pin_types.OUTPUT,unit=1),
            Pin(num='15',name='N/C',func=pin_types.NOCONNECT,unit=1),
            Pin(num='16',name='RDYN',func=pin_types.BIDIR,unit=1),
            Pin(num='17',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='18',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='19',name='RESET',func=pin_types.INPUT,unit=1),
            Pin(num='2',name='DEC1',func=pin_types.BIDIR,unit=1),
            Pin(num='20',name='VDD_PA',func=pin_types.OUTPUT,unit=1),
            Pin(num='21',name='ANT1',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='ANT2',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='24',name='AVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='25',name='IREF',func=pin_types.INPUT,unit=1),
            Pin(num='26',name='AVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='27',name='XC2',func=pin_types.BIDIR,unit=1),
            Pin(num='28',name='XC1',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='AVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='3',name='DEC2',func=pin_types.BIDIR,unit=1),
            Pin(num='30',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='31',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='32',name='DCC',func=pin_types.BIDIR,unit=1),
            Pin(num='33',name='EP',func=pin_types.PWRIN,unit=1),
            Pin(num='4',name='XL2',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='XL1',func=pin_types.BIDIR,unit=1),
            Pin(num='6',name='ACTIVE',func=pin_types.BIDIR,unit=1),
            Pin(num='7',name='TXD',func=pin_types.OUTPUT,unit=1),
            Pin(num='8',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='9',name='VDD',func=pin_types.PWRIN,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'BM78SPPS5NC2', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'BM78SPPS5NC2'}), 'ref_prefix':'U', 'fplist':['RF_Module:BM78SPPS5XC2', 'RF_Module:BM78SPPS5XC2'], 'footprint':'RF_Module:BM78SPPS5XC2', 'keywords':'Bluetooth BLE BT GAP SPP SDP RFCOMM L2CAP GATT ATT SMP L2CAP', 'description':'', 'datasheet':'http://ww1.microchip.com/downloads/en/DeviceDoc/60001380C.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nBM78SPPS5NC2\n\nBluetooth BLE BT GAP SPP SDP RFCOMM L2CAP GATT ATT SMP L2CAP', 'pins':[
            Pin(num='1',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='PMULDO_O',func=pin_types.PASSIVE,unit=1),
            Pin(num='11',name='P0_4',func=pin_types.OUTPUT,unit=1),
            Pin(num='12',name='P1_5',func=pin_types.OUTPUT,unit=1),
            Pin(num='13',name='SCL/P1_2',func=pin_types.OUTPUT,unit=1),
            Pin(num='14',name='SDA/P1_3',func=pin_types.BIDIR,unit=1),
            Pin(num='15',name='P1_7',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='P0_5',func=pin_types.BIDIR,unit=1),
            Pin(num='17',name='P0_0',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='P2_0',func=pin_types.INPUT,unit=1),
            Pin(num='19',name='P2_4',func=pin_types.INPUT,unit=1),
            Pin(num='2',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='20',name='EAN',func=pin_types.INPUT,unit=1),
            Pin(num='21',name='~{RST}',func=pin_types.INPUT,unit=1),
            Pin(num='22',name='HCI_RXD',func=pin_types.INPUT,unit=1),
            Pin(num='23',name='HCI_TXD',func=pin_types.OUTPUT,unit=1),
            Pin(num='24',name='P3_1',func=pin_types.BIDIR,unit=1),
            Pin(num='25',name='P3_2',func=pin_types.BIDIR,unit=1),
            Pin(num='26',name='P3_3',func=pin_types.BIDIR,unit=1),
            Pin(num='27',name='P3_4',func=pin_types.BIDIR,unit=1),
            Pin(num='28',name='P3_6',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='P3_7',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='30',name='LED1',func=pin_types.OUTPUT,unit=1),
            Pin(num='31',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='32',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='33',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='4',name='BAT_IN',func=pin_types.PWRIN,unit=1),
            Pin(num='5',name='SW_BTN',func=pin_types.INPUT,unit=1),
            Pin(num='6',name='LDO33_O',func=pin_types.PWROUT,unit=1),
            Pin(num='7',name='VDD_IO',func=pin_types.PWRIN,unit=1),
            Pin(num='8',name='LDO18_O',func=pin_types.PWROUT,unit=1),
            Pin(num='9',name='WAKE_UP',func=pin_types.INPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'SPBTLE-RF0', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'SPBTLE-RF0'}), 'ref_prefix':'U', 'fplist':['RF_Module:ST_SPBTLE', 'RF_Module:ST_SPBTLE'], 'footprint':'RF_Module:ST_SPBTLE', 'keywords':'BLE bluetooth module low-power', 'description':'', 'datasheet':'http://www.st.com/resource/en/datasheet/spbtle-rf0.pdf', 'search_text':'/usr/share/kicad/symbols/RF_Bluetooth.kicad_sym\nSPBTLE-RF0\n\nBLE bluetooth module low-power', 'pins':[
            Pin(num='1',name='NC/EXT_LPCLK',func=pin_types.INPUT,unit=1),
            Pin(num='10',name='SPI_~{CS}',func=pin_types.INPUT,unit=1),
            Pin(num='11',name='~{BT_RESET}',func=pin_types.INPUT,unit=1),
            Pin(num='2',name='NC/GPIO2',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='NC/ANA_TEST',func=pin_types.INPUT,unit=1),
            Pin(num='4',name='SPI_IRQ',func=pin_types.OUTPUT,unit=1),
            Pin(num='5',name='VIN',func=pin_types.PWRIN,unit=1),
            Pin(num='6',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='7',name='SPI_CLK',func=pin_types.INPUT,unit=1),
            Pin(num='8',name='SPI_MISO',func=pin_types.OUTPUT,unit=1),
            Pin(num='9',name='SPI_MOSI',func=pin_types.INPUT,unit=1)], 'unit_defs':[] })])